package com.zhanghao.consumer.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhanghao
 * @create 2021/5/25 16:02
 */
@RestController
@RefreshScope
public class ConfigController {
    @Value("${username:lily}")
    private String username;

    @GetMapping("/username")
    public String get() {
        return username;
    }
}
